﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
using BUS;
using DTO;

namespace BCSALE
{
    public partial class frmDanhMucHangHoa : DevComponents.DotNetBar.Office2007Form
    {
        BindingSource _dsHangHoa;
        public frmDanhMucHangHoa()
        {
            InitializeComponent();
        }

        private void frmDanhMucHangHoa_Load(object sender, EventArgs e)
        {
            spgDanhSachHangHoa.PrimaryGrid.ShowInsertRow = true;
            
            _dsHangHoa = new BindingSource();
            _dsHangHoa.DataSource = HangHoaBUS.loadDSHangHoa();



            spgDanhSachHangHoa.ActiveGrid.DataSource = _dsHangHoa;
            
            
            
            
            
        }

        private void btnThoat_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Bạn có chắc là muốn thoát khỏi chương trình không ?", "Thông Báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
            {
                this.Close();
            }
        }

      
    }
}